package com.heima.user.intercoller;


import com.heima.user.utils.AppUserThreadLocalUtil;
import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.springframework.stereotype.Component;

@Component
public class FeignHeaderInterceptor implements RequestInterceptor {
    @Override
    public void apply(RequestTemplate requestTemplate) {
        requestTemplate.header("user", AppUserThreadLocalUtil.get().getId()+"");
    }
}
